import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Check here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Check extends Elemento
{
        private GreenfootImage[] c={new GreenfootImage("chek1.png"),
        new GreenfootImage("chek2.png"),
        new GreenfootImage("chek3.png"),
        new GreenfootImage("chek4.png")};
        private double d;
        private double x;
        private double y;
        
      
     
        int i=0;
        
       
    public Check()
    {
        d = -1;
    }
 
    /**
     * Act - do whatever the Check wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {
        animate();
        if(d==-1)
        {
            super.inicia();
            d=1;
        }    
    } 
    
    /**
     * An example of a method - replace this comment with your own
     *
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y
     */
    public void animate()
    {  
        
      
        if(i==4){
          i=0;
         }
         setImage(c[i]);
         i++;
        
        
    }
    

}
